<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib prefix="huoyun" uri="/huoyun"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>注册新的车辆</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">

<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/theme/css/main.css">
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/theme/css/style_userCenter.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/theme/css/dialog.css">
<style type="text/css">
.registerCar td input.text{
	width: 120px;
}
</style>

<script type="text/javascript"
	src="${pageContext.request.contextPath}/theme/js/calendar/WdatePicker.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/theme/js/jquery-1.6.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/theme/js/jquery.validate.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/theme/js/additional-methods.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/theme/js/jquery.form.js"></script>
	<!--
<script type="text/javascript" src="${pageContext.request.contextPath}/car/js/register-car-tzh.js"></script>
  -->
<script type="text/javascript" src="${pageContext.request.contextPath}/theme/js/dialog.js"></script>

<script type="text/javascript">
	  $(document).ready(function(){
	  	$("#regCarForm").validate({
	  	errorPlacement: function(error, element) {
			// element.parent("td").append(error);
				element.attr("title", error.html());
			},
	  	rules : {
	  		"car.driverId" : {
	  			required : true,
	  			isValid : true
	  		},
	  		"car.type":{
	  			required : true,
	  			isValid : true
	  		},
	  		"car.loadMax":{
	  			required : true,
	  			number: true
	  		},
	  		"car.length":{
	  			required : true,
	  			number: true
	  		},
	  		"car.width":{
	  			required : true,
	  			number: true
	  		},
	  		"car.height":{
	  			required : true,
	  			number: true
	  		},
	  		"cardNumber1":{
	  			required : true
	  		},
	  		"cardNumber2":{
	  			required : true
	  		},
	  		"cardNumber3":{
	  			required : true,
	  			carNumber5 : true
	  		},
	  		"car.engineNumber":{
	  			required : true
	  		},
	  		"car.carIDCode":{
	  			required : true
	  		},
	  		"car.owner":{
	  			required : true
	  		},
	  		"car.registrationDate":{
	  			date1: true
	  		},
	  		"car.issueDate":{
	  			date1: true
	  		}
	  	},
	  	messages : {
	  		"car.driverId" : {
	  			required : "请选择司机",
	  			isValid : "请选择司机"
	  		},
	  		"car.type":{
	  			required : "请选择车辆类型信息",
	  			isValid : "请选择车辆类型信息"
	  		},
	  		"car.loadMax":{
	  			required : "请输入额定载重量",
	  			number: "请输入合法的数字"
	  		},
	  		"car.length":{
	  			required : "请输入车辆的长度",
	  			number: "请输入合法的长度数值"
	  		},
	  		"car.width":{
	  			required : "请输入车辆的宽度",
	  			number: "请输入合法的宽度数值"
	  		},
	  		"car.height":{
	  			required : "请输入车辆的高度",
	  			number: "请输入合法的高度数值"
	  		},
	  		"cardNumber1":{
	  			required : "请选择车牌号所属区域"
	  		},
	  		"cardNumber2":{
	  			required : "请选择车牌号所属区域"
	  		},
	  		"cardNumber3":{
	  			required : "请输入车牌号",
	  			carNumber5 : "请填写正确的车牌号"
	  		},
	  		"car.engineNumber":{
	  			required : "请输入发动机号码"
	  		},
	  		"car.carIDCode":{
	  			required : "请输入车辆识别代号"
	  		},
	  		"car.owner":{
	  			required : "请输入车辆归属人"
	  		},
	  		"car.registrationDate":{
	  			date1: "请输入合法的注册日期"
	  		},
	  		"car.issueDate":{
	  			date1: "请输入合法的发证日期"
	  		}
	  	}
	  	});
	  });
  </script>
 
</head>

<body>
	<div>
		<jsp:include page="../userAdmin/nav.jsp">
			<jsp:param value="nav_main" name="nav" />
		</jsp:include>
	</div>
	<div class="realCer">
		<!--主体部分-->
		<div class="realMain clearfix mt10">
			<!--左侧菜单-->
			<div class="realLeft" id="meunLeft">
				<jsp:include page="../userAdmin/leftMenu.jsp">
					<jsp:param value="con_nav_main" name="con_nav" />
					<jsp:param value="registerCar" name="selectMenu"/>
				</jsp:include>
			</div>
			<!--中间-->
			<div class="realRight ml10">
				<!--中间-->
				<div class="realR_left">
					<div class="box" style="width:805px;">
						<div class="tit">
							<strong>注册新的车辆</strong>
						</div>
						<div class="con">
							<div style="color: red; margin-left: 100px;">
								<s:property value="resultMsg" />
								<s:fielderror></s:fielderror>
							</div>
							<div class="form_wrap clearfix">
								<form style="position:relative; left:50px;" method="post" id="driver_form" name="driver_form" action="/huoyun/car/saveAll.action">
										<table class="tableForm registerCar">
											<tbody>
												<!-- 司机个人基本信息 -->
												<tr>
													<td colspan="2" >
														<h2>司机个人基本信息</h2>
													</td>
												</tr>
												<tr>
													<td class="tdLabel" width="120">
														<span class="required-field">*</span>姓名:
													</td>
													<td class="tdValue">
														<input type="text" name="driver.name" id="driver.name"
														class="inputtext" />
													</td>
												</tr>
												<tr>
													<td class="tdLabel" width="100">
														性别:
													</td>
													<td class="tdValue">
														<label for="male"><input type="radio"
														name="driver.gender" id="male" value="0" />男</label> <label
														for="female"><input type="radio"
														name="driver.gender" id="female" value="1" />女</label> <span
														id="gender_error_span" class="box-error"><b
														id="gender_error_span_i"></b> </span>
													</td>
												</tr>
												<tr>
													<td class="tdLabel" width="100">
														民族:
													</td>
													<td class="tdValue">
														<input type="text" name="driver.nation" id="driver.nation"
														class="inputtext" />
													</td>
												</tr>
												<tr>
													<td class="tdLabel" width="100">
														生日:
													</td>
													<td class="tdValue">
														<input type="text" name="driver.birthDate"
														id="driver.birthDate" class="Wdate" onClick="WdatePicker()" />
													</td>
												</tr>
												<tr>
													<td class="tdLabel" width="100">
														<span class="required-field">*</span>住址:
													</td>
													<td class="tdValue">
														<!-- <input type="text" name="driver.address" id="driver.address"
														style="WIDTH:400px" class="inputtext" /> -->
														<huoyun:regionSelect provinceName="driver.province" cityName="driver.city" townName="driver.town" />
													</td>
												</tr>
												<tr>
													<td class="tdLabel" width="100">
														<span class="required-field">*</span>手机号码:
													</td>
													<td class="tdValue">
														<input type="text" name="driver.mobilePhone" id="driver.mobilePhone"
														class="inputtext" />
													</td>
												</tr>
												<tr>
													<td class="tdLabel" width="100">
														<span class="required-field">*</span>身份证号码:
													</td>
													<td class="tdValue">
														<input type="text" name="driver.idCardNumber"
														id="driver.idCardNumber" class="inputtext" />
													</td>
												</tr>
												<tr>
													<td colspan="2" >
														<h2>驾驶证信息</h2>
													</td>
												</tr>
												<tr>
													<td class="tdLabel" width="120">
														<span class="required-field">*</span>准驾车型:
													</td>
													<td class="tdValue">
														<input type="text" name="driver.drivingLicenseCarType"
														id="driver.drivingLicenseCarType" class="inputtext" />
													</td>
												</tr>
												<tr>
													<td class="tdLabel" width="120">
														<span class="required-field">*</span>档案编号:
													</td>
													<td class="tdValue">
														<input type="text" name="driver.drivingLicenseNumber"
														id="driver.drivingLicenseNumber" class="inputtext" />
													</td>
												</tr>
												<tr>
													<td class="tdLabel" width="120">
														有效起始日期:
													</td>
													<td class="tdValue">
														<input type="text"
														name="driver.drivingLicenseEffectiveStartDate"
														id="driver.drivingLicenseEffectiveStartDate" class="Wdate"
														onClick="WdatePicker()" />
													</td>
												</tr>
												<tr>
													<td class="tdLabel" width="120">
														有效期限:
													</td>
													<td class="tdValue">
														<input type="text"
														name="driver.drivingLicenseEffectivePeriod"
														id="driver.drivingLicenseEffectivePeriod" class="inputtext" />
													</td>
												</tr>
												<tr>
													<td class="tdLabel" width="120">
													</td>
													<td class="tdValue">
														<!-- <input id="ee" type="submit" class="default_btn" value="添加" /> -->
														<div class="button button-mblue">
															<input type="submit" value="添 加" id="ee" class="button-text">
														</div>
													</td>
												</tr>
											</tbody>
											</table>
										</form>
							</div>
						</div>
					</div>
				</div>
				<!-- 中间 -->
				<!--右侧-->
				<%-- <div class="realR_right">
					<div class="box mb10">
						<jsp:include page="../noticeTemplate.jsp"></jsp:include>
					</div>
				</div> --%>
				<!--右侧-->
			</div>
			<!--中由-->
		</div>
	</div>
	<div>
		<jsp:include page="../footer.jsp"></jsp:include>
	</div>
</body>
</html>
